-- GENERATED SPELL FOR [Carrion Spinner] --


function spell0_15975(pUnit, Event) --@Poison Spray,Self--
pUnit:FullCastSpellOnTarget(30043,pUnit)
pUnit:RegisterEvent('Sorts_15975', 531, 1)
end

function spell1_15975(pUnit, Event) --@Poison Spray,Self--
pUnit:FullCastSpellOnTarget(56032,pUnit)
pUnit:RegisterEvent('Sorts_15975', 596, 1)
end

function spell2_15975(pUnit, Event) --@Spider Web,n/a--
pUnit:FullCastSpellOnTarget(28434,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15975', 1283, 1)
end

function Sorts_15975(pUnit, Event)
local choix_sorts_15975 = math.random(0, 2)
if choix_sorts_15975 == 0 then
pUnit:RegisterEvent('spell0_15975', 1, 1)
end
if choix_sorts_15975 == 1 then
pUnit:RegisterEvent('spell1_15975', 1, 1)
end
if choix_sorts_15975 == 2 then
pUnit:RegisterEvent('spell2_15975', 1, 1)
end
end

function mob15975_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15975', math.random(1500, 3000), 1)
end

function mob15975_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15975_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15975_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15975, 1, 'mob15975_Action')
RegisterUnitEvent(15975, 2, 'mob15975_Leave')
RegisterUnitEvent(15975, 3, 'mob15975_Kill')
RegisterUnitEvent(15975, 4, 'mob15975_Die')
